<template>
  <div @click="add">我是头部组件{{ count }}</div>
</template>
<script>
//对外暴露一个配置对象
export default {
  name: "Header",
  data() {
    return {
      count: 1,
    };
  },
  methods: {
    add() {
      this.count++;
    },
  },
};
</script>
<style>
</style>